package com.linewell.mongodemo.pojo;

import org.hibernate.validator.constraints.Length;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.UUID;

public class NewAddCol implements Serializable{
	
	private static final long serialVersionUID = 8149985648699864712L;
	
	@Id
	private String id;
	/**
	 * 新增字段名
	 */
	@Field("t_name")
	private String tName;
	/***
	 * 英文名
	 */
	@Field("t_key")
	private String tKey;
	/**
	 * 字段值
	 */
	@Field("t_value")
	private String tValue;
	/**
	 * 类型
	 */
	@Field("type")
	private String type;
	/**
	 * 长度
	 */
	@Field("length")
	private String length;
	/**
	 * 是否必填
	 */
	@Field("required")
	private String required;
	
	/**
	 * 是否显示（0：否，1：是）
	 */
	@NotNull
	@Length(min=0,max=2)
	@Field("t_display")
	private String tDisplay;
	/**
	 * 排序
	 */
	@NotNull
	@Length(min=0,max=2)
	@Field("t_sort")
	private String tSort;
	/**
	 * 选项内容
	 */
	@NotNull
	@Length(min=0,max=1000)
	@Field("t_content")
	private String tContent;
	
	/**
	 * 字段对应元数据
	 */
	@NotNull
	@Length(min=0,max=1000)
	@Field("t_meta")
	private String tMeta;

	
	public String gettMeta() {
		return tMeta;
	}

	public void settMeta(String tMeta) {
		this.tMeta = tMeta;
	}

	public NewAddCol() {
		super();
	}

	public String gettName() {
		return tName;
	}
	public void settName(String tName) {
		this.tName = tName;
	}
	public String gettValue() {
		return tValue;
	}
	public void settValue(String tValue) {
		this.tValue = tValue;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getLength() {
		return length;
	}
	public void setLength(String length) {
		this.length = length;
	}
	public String getRequired() {
		return required;
	}
	public void setRequired(String required) {
		this.required = required;
	}
	public String gettKey() {
		return tKey;
	}
	public void settKey(String tKey) {
		this.tKey = tKey;
	}
	public String gettDisplay() {
		return tDisplay;
	}
	public void settDisplay(String tDisplay) {
		this.tDisplay = tDisplay;
	}
	public String gettSort() {
		return tSort;
	}
	public void settSort(String tSort) {
		this.tSort = tSort;
	}
	public String gettContent() {
		return tContent;
	}
	public void settContent(String tContent) {
		this.tContent = tContent;
	}

	@Override
	public String toString() {
		return "NewAddCol [tKey=" + tKey + ", tValue=" + tValue + "]";
	}
	
	
	
}
